
<script
	type="text/javascript"
	src="<?php echo Yii::app()->request->baseUrl;?>/external/tiny_mce/jquery.tinymce.js"></script>
<script type="text/javascript">
$().ready(function() {
	$('#wysiwyg').tinymce({
		// Location of TinyMCE script
		script_url : '<?php echo Yii::app()->request->baseUrl;?>/external/tiny_mce/tiny_mce.js',

		mode : "textareas",
		theme : "advanced",
		plugins :"media,table",
		// Theme options
		theme_advanced_buttons1 : "bold,italic,underline,|,justifyleft,justifycenter,formatselect,bullist,numlist,|,link,unlink,|,forecolor",
		theme_advanced_buttons2 : "tablecontrols,media,image",
		theme_advanced_toolbar_location : "top",
		theme_advanced_toolbar_align : "left",
		theme_advanced_resizing : true,
		content_css : "<?php echo Yii::app()->request->baseUrl;?>/external/tiny_mce/custom_content.css"
	});
});

</script>

<?php echo CHtml::form('','post',array("data-ajax"=>"false","id"=>"namecardForm",'class'=>'form-horizontal','enctype'=>'multipart/form-data')); ?>
<fieldset  class='div div-plain'>
	<h2 class='div'>创建一个<?php echo $node->type == Node::TYPE_PAGE? "页面":"博客"?>	</h2>
	<?php echo CHtml::activeHiddenField($node, 'id')?>
	<?php echo CHtml::activeHiddenField($node, 'type')?>
	<?php echo CHtml::activeHiddenField($node, 'parent_id')?>
	<div class="control-group">
		<label class='control-label'><?php echo  CActiveForm::labelEx($node,'title');?></label>
		<div class="controls">
		<?php echo CHtml::activeTextField($node,"title");?>
			<?php if($node->getError("title")):?>
			<span class="label important"><?php echo $node->getError("title")?>
			</span>
			<?php endif;?>
		</div>
	</div>

	<div class="control-group">
		<label class='control-label'><?php echo  CActiveForm::labelEx($node,'content');?></label>
		<div class="controls">
		<?php echo CHtml::activeTextArea($node,"content",array("style"=>'width:480px;height:400px;','id'=>'wysiwyg'));?>
			<?php if($node->getError("content")):?>
			<span class="label important"><?php echo $node->getError("content")?>
			</span>
			<?php endif;?>
		</div>
	</div>	
	
	<div class="form-actions">
		<input type="submit" value="完成" class="btn btn-primary">
	</div>
</fieldset>
<?php echo CHtml::endForm(); ?>